﻿using System.Collections.Generic;
using SqlSugar;
using WebApplication11.Helper;
using WebApplication11.Models;

namespace WebApplication11.Dao;

public class departmentDao
{
    public static SqlSugarClient db = dbHelper.CretClient();

    public List<leader> getIdentity(string username)
    {
        var res = db.Queryable<user, department>((m, d)=> m.Username == username && m.Username == d.Leader)
            .Select((m,d)=> new leader
            {
                isLeader = true
            }).ToList();
        return res;
    }
}